<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/displaytag-11.tld" prefix="display" %>

<script src="<%=request.getContextPath()%>/js/displaytag.js" type="text/javascript"></script>

<logic:messagesPresent message="true"> 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgInfor" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
  <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgError" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgWarn" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgOk" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
</logic:messagesPresent> 
 

<table width="99%"  border="0" cellpadding="0" cellspacing="0" widtd="100%">
 
  <tr> 
    <td height="25" colspan="12" align="center" class="titulosenblanco"><strong> CRITERIOS DE BUSQUEDA DE GRUPOS DE USUARIOS</strong></td>
  </tr>
   <tr> 
    <td height="25" colspan="12" align="center" class="titulosenblanco">
    <table width="99%" border="0" cellpadding="0" cellspacing="0">
		  <tr> 
			
          <td align="right"><html:link page="/admin/newUserGroup.do"><img src="<%= request.getContextPath() + "/images/b_nuevo.gif" %>" alt="Nuevo" width="22" height="22" border="0"><br>
            <span class="celdaayd">Nuevo grupo de usuarios</span></html:link></td>
		  </tr>
		 <tr> 
           <td>&nbsp;</td>
         </tr>  
      </table>

    </td>
  </tr>
 
  
  <html:form action="/admin/findUserGroup.do" focus="name">     
  <input type="hidden" name="search" value="search" />
  <tr align="left">
    <td width="100%" align="center"> <table width="70%" border="0" cellpadding="3" cellspacing="3">
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Nombre</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="name" maxlength="40" value=""/></td>
          <td width="10%">&nbsp;</td>
        </tr>
        
        <!--<tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Vigente</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:select styleClass="form" property="use" style="width:40" > 
            <html:option value = "S" >Si</html:option>
            <html:option value = "N" >No</html:option>
            </html:select></td>
          <td width="10%">&nbsp;</td>
        </tr>-->
        <!--<tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Valido Desde</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="effectiveFrom" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Valido Hasta</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="effectiveUntil" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>-->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%"><input type="submit" name="Submit" value="Buscar"> </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr> 
          <td colspan="4">&nbsp;</td>
        </tr>
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%">&nbsp;</td>
          <td width="10%">&nbsp;</td>
        </tr>
      </table>
	</td>
  </tr>
</html:form> 	
  
  
  <tr>
    <td colspan="12" align="left">
      <logic:present name="msg">
        <% if(request.getAttribute("msg") != null){ %>
          <div align="center"><%=request.getAttribute("msg")%></div>
        <%}%>
      </logic:present>
    </td>
  </tr>
  
  
  <tr> 
    <td colspan="12" align="left">
	<logic:present name="userGroupList"> 
	<%int index = 1;
	  String style = "add";%>
      <display:table name="requestScope.userGroupList"   pagesize="10" requestURI='<%= request.getContextPath() + "/admin/findUserGroup.do" %>' class="bordesTable" id="groups"  cellpadding="3" cellspacing="1"  style="width:100%">
			
			<display:column  headerClass="headerTable" class="Nombre" title="No." >
					<div align="center"><%=index%></div>
			</display:column>	
			
			<display:column headerClass="headerTable" class="Numero" title="Nombre" >
			        <html:link paramId="code" paramName="groups" paramProperty="code" page="/admin/modifyUserGroup.do">
                   <bean:write name="groups" property="name" /> 
              </html:link>       
			</display:column>	
			<display:column headerClass="headerTable" class="Numero" title="Descripcion" >
			         <bean:write name="groups" property="description" /> 	
			</display:column>		
			<%=index++%>
		</display:table>
		</logic:present>
		</td>
  </tr>
  
</table>
